package praktikum_1_ylesanded.ylesanne_1;

import helperClasses.FileHelper;
import praktikum_1_ylesanded.MathHelper;

/**
 * Created by IntelliJ IDEA.
 * User: Jaan Sepp
 * Date: 20.09.11
 * Time: 20:37
 * To change this template use File | Settings | File Templates.
 */
public class Ylesanne_1 {
  public static void main(String[] args) {

    String fileName = "originalNumbers";
    FileHelper fileHelper = new FileHelper();
    MathHelper mathHelper = new MathHelper();

    //Read original file contents.
    String[] originalNumbers = fileHelper.readFromFile(fileName + ".in").split("\n");

    //Calculate Fibonacci numbers.
    String fibonacciNumbers = mathHelper.getFibonacciNumbersRecursively(originalNumbers);

    //Write Fibonacci numbers into file.
    fileHelper.writeToFile(fileName + ".out", fibonacciNumbers);
  }
}